package com.ftf.tp.user.infrastructure.adapter.http;

import com.alibaba.fastjson.JSONObject;
import com.ftf.tp.user.application.adapter.http.PassportRestAdaptor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * passport服务 rest实现
 *
 * @author tanghao
 * @date 2022/6/24
 */
@Service
public class RestPassportRestAdaptorImpl implements PassportRestAdaptor {

    @Resource
    private PassportFeign passportFeign;

    /**
     * 根据UserId获取tp网站用户信息
     *
     * @param passportId 用户Id
     */
    @Override
    public JSONObject getTpUserInfoByUserId(Long passportId) {
        return passportFeign.getTpUserInfoByUserId(passportId);
    }
}
